package com.xyyl.patient.mapper.order;

import com.xyyl.patient.core.mapper.GenericMapper;
import com.xyyl.patient.entity.order.SpeedPhoneOrder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @author chens
 * @projectName:xyyl-oms-server
 * @ClassName: SpeedPhoneOrder
 * @Description:SpeedPhoneOrder
 * @date 2018-01-02 10:18:30
 */
public interface SpeedPhoneOrderMapper extends GenericMapper {

    /**
     * @param @param  paramMap
     * @param @return 参数
     * @return SpeedPhoneOrder    返回类型
     * @throws
     * @Title: queryForObject
     * @Description: 查询订单明细
     */
    SpeedPhoneOrder queryForObject(Map<String, Object> paramMap);


    @Select("SELECT xyyl_quickquestion.questionid as id ,xyyl_quickquestion.*,xyyl_archives.age,xyyl_archives.birthday,xyyl_archives.`name`,xyyl_archives.sex,xyyl_archives.phoneNumber,xyyl_archives.ourself from xyyl_quickquestion LEFT JOIN xyyl_archives on xyyl_quickquestion.archivesid = xyyl_archives.id WHERE xyyl_quickquestion.questionid =  #{id}")
    Map<String, Object> queryInfo1(@Param(value = "id") Integer id);

    @Select("SELECT xyyl_graph_consult_order.*,xyyl_archives.age,xyyl_archives.birthday,xyyl_archives.`name`,xyyl_archives.sex,xyyl_archives.phoneNumber,xyyl_archives.ourself from xyyl_graph_consult_order LEFT JOIN xyyl_archives on xyyl_graph_consult_order.archivesid = xyyl_archives.id  WHERE xyyl_graph_consult_order.id=#{id}")
    Map<String, Object> queryInfo2(@Param(value = "id") Integer id);

    @Select("SELECT xyyl_userphone_order.*,xyyl_archives.age,xyyl_archives.birthday,xyyl_archives.`name`,xyyl_archives.sex,xyyl_archives.phoneNumber,xyyl_archives.ourself from xyyl_userphone_order LEFT JOIN xyyl_archives on xyyl_userphone_order.archivesid = xyyl_archives.id  WHERE xyyl_userphone_order.id = #{id}")
    Map<String, Object> queryInfo3(@Param(value = "id") Integer id);

    @Select("SELECT * from xyyl_speed_phone_order WHERE id  =#{id}")
    Map<String, Object> queryInfo4(@Param(value = "id") Integer id);

    @Select("SELECT xyyl_continuation_online.*,xyyl_archives.age,xyyl_archives.birthday,xyyl_archives.`name`,xyyl_archives.sex,xyyl_archives.phoneNumber,xyyl_archives.ourself from xyyl_continuation_online  LEFT JOIN xyyl_archives on xyyl_continuation_online.archives_id = xyyl_archives.id WHERE xyyl_continuation_online.id =#{id}")
    Map<String, Object> queryInfo5(@Param(value = "id") Integer id);

}
